//http模块
var redirectUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx9e87cb229f3e0e4d&redirect_uri=https%3a%2f%2fjika.lafengzhuangyuan.com%2frubbish%2findex.html&response_type=code&scope=snsapi_userinfo&state=0#wechat_redirect"
var epidemicurl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4f9c624743901d4c&redirect_uri=https%3a%2f%2fjika.lafengzhuangyuan.com%2fanswerGame%2fh5%2findex.html&response_type=code&scope=snsapi_userinfo&state=0#wechat_redirect"
var nhwurl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4f9c624743901d4c&redirect_uri=https%3a%2f%2fjika.lafengzhuangyuan.com%2fanswerGame%2fnhwH5%2findex.html&response_type=code&scope=snsapi_userinfo&state=0#wechat_redirect"
var express = require('express');
var httpServer = function() {}
httpServer.prototype.init = function() {
	console.log("httpServer init")
	var app = express()
	app.use(express.static(__dirname + '/public'));
	app.get('/redirect',function(req,res) {
		res.writeHead(301, {'Location': redirectUrl});
		res.end(); 
	});
	app.get('/epidemic',function(req,res) {
		res.writeHead(301, {'Location': epidemicurl});
		res.end(); 
	});
	app.get('/nhwurl',function(req,res) {
		res.writeHead(301, {'Location': nhwurl});
		res.end(); 
	});
	app.listen(80);
}
module.exports = {
	id : "httpServer",
	func : httpServer,
	scope : "prototype",
	init : "init"
}